package com.our.biz;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.our.dao.RepayTypeMapper;
import com.our.model.RepayType;
import com.our.util.BusinessException;

@Service
public class RepayBiz {
	@Resource
	private RepayTypeMapper dao;
	
	public List<RepayType> findAll() throws BusinessException{
		try {
			return dao.findAll();			
		} catch (Exception e) {
			e.printStackTrace();
			throw new BusinessException("E020202B05");
		}
	}
	public RepayType findById(int repaytypeId) throws BusinessException{
		try {
			return dao.selectByPrimaryKey(repaytypeId);			
		} catch (Exception e) {
			e.printStackTrace();
			throw new BusinessException("E020202B04");
		}
	}
	
}
